// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(47,2) == 0;
	question = "special";
	text1 = "This road passes through a thick forest at the base of the eastern mountain chain. It doesn't look like this area has ever been heavily settled, though you do see signs of frequent logging.";
	text2 = "You are on the safe side of two of the forts that keep the rebels on the other side of the mountains. Looking down the road, you can see that the Shapers have been trying to use their machinery to control these woods. With little success.";
	text3 = "You can see that they have erected pacification pylons along the road, perhaps to perplex and slow down rogues so that soldiers could get rid of them. However, the machines have broken down. The rogues they caught are now wandering loose.";
	text4 = "If you can't find a way to reactivate the pylons, fighting your way through will be the only option.";
	action = SET_SDF 47 2 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(47,3) == 0;
	question = "special";
	text1 = "There are the remains of a pylon here. Someone was cannibalizing it for parts. Then this camp was abandoned.";
	action = SET_SDF 47 3 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Perikalia - West";
	text3 = "  Fort Vengeance - North";
	text4 = "  Fort Rockfall - East";
	




begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Battle Alpha 17";
	text1 = "You are surprised to find that not all of the creations in these woods are rogues. There is one lone battle alpha hiding in this crevice, trying to avoid the monsters and the pylons.";
	text2 = "It is very thin and ragged, and its skin is covered with scratches. It has been out in the woods, unaccompanied, for months. It is amazing that the creature hasn't gone rogue yet. A copper armband hangs loosely from its arm. A '17' is etched on it.";
	text3 = "When you get close, it says, _Hurrrr ... No hurt. No hurt. Hungry. Cold._";
	text5 = "The lost battle alpha is still cowering in the corner. The ground is littered with the bones of the small animals it has been eating to stay alive. The armlet with the '17' etched on it still hangs from its thin arm.";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Where are you from?";
	text1 = "It stares at the wall, concentrating on the question. It doesn't respond. You aren't sure if it understood you or not.";

begintalknode 12;
	state = 11;
	nextstate = -1;
	condition = get_stat(20) > 3;
	question = "It's all right. Tell me. Where are you from?";
	text1 = "Using your calmest, most reassuring voice, you get through to the creature. It says, with difficulty, _Per ... Peri ... Perikalia._";

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Tell me about this area.";
	text1 = "It looks at you sadly, but it doesn't say anything. The creature is barely verbal.";

begintalknode 14;
	state = 10;
	nextstate = 12;
	condition = gf(41,18) == 1;
	question = "Warzana sent me to find you.";
	text1 = "The mention of Warzana's name causes the creature to look at you, though you aren't sure whether it is scared of going back or relieved to be rescued.";
	text2 = "_Warzana ... Perikalia. Home? Go home?_";

begintalknode 15;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "No. Just stay here for now.";
	text1 = "The alpha doesn't like that order, but it is still loyal and obedient. It says, _Stay. I stay._";
	action = END_TALK;

begintalknode 16;
	state = 12;
	nextstate = -1;
	condition = get_stat(20) > 4;
	question = "You need to return to Perikalia.";
	text1 = "It takes some soothing and coaxing, but you are able to convince the creature to walk back to Perikalia. It is weak, but it should have enough strength to get there. Battle alphas are hardy creatures.";
	text2 = "With a final sad look, it walks off. Whether it survives the journey or not, you've learned enough for Warzana's purposes.";
	action = END_TALK;
	code =
		set_attitude(43,3);
		inc_flag(100,0,2);
		sf(47,1,2);
	break;
	
begintalknode 17;
	state = 12;
	nextstate = -1;
	condition = get_stat(20) > 4;
	question = "You don't need to return to Perikalia. You can go to rebel lands. To the east.";
	text1 = "It takes some soothing and coaxing, but you are able to convince the creature to escape. It does not want to return to Warzana's care. It is weak, but it might have enough strength to slip through the mountains. They are hardy creatures.";
	text2 = "It only leaves when you promise to fool Warzana into thinking that it is dead. With a final sad look, it walks off. Whether it survives the journey or not, you've learned enough for Warzana's purposes.";
	action = END_TALK;
	code =
		set_attitude(43,3);
		inc_flag(100,0,-2);
		sf(47,1,1);
	break;

begintalknode 18;
	state = 12;
	nextstate = -1;
	condition = get_stat(20) <= 4;
	question = "You need to return to Perikalia.";
	text1 = "You try to convince the creature that it can't just stay here, but it is too hungry and tired. You can't summon up enough authority to get through to it.";
	text2 = "It stares at you mutely and doesn't move an inch.";

begintalknode 19;
	state = 12;
	nextstate = -1;
	condition = get_stat(20) <= 4;
	question = "You don't need to return to Perikalia. You can go to rebel lands. To the east.";
	text1 = "You try to convince the creature that it can't just stay here, but it is too hungry and tired. You can't summon up enough authority to get through to it.";
	text2 = "It stares at you mutely and doesn't move an inch.";
	
begintalknode 20;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I'd better get rid of you before you go rogue. (Attack.)";
	text1 = "The battle alpha is tired and weak, but it is still capable of defending itself.";
	action = END_TALK;
	code =
		set_attitude(43,3);
		inc_flag(100,0,2);
		sf(47,1,1);
	break;

begintalknode 21;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I'll just be going now.";
	text1 = "The alpha watches you mutely as you walk away.";
	action = END_TALK;

//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = "There is a power spiral here. It seems to have been hooked up to send a constant, low flow of power into the crystal conduits here. The conduits then snake through the grass and disappear into the dirt.";
	text2 = "For some reason, no power is coming out. The conduits are dark.";
	text3 = "There is a power spiral here. It is still sending a constant, low flow of power into the crystal conduits.";
	code =
		if (gf(47,gf(47,0)) > 0) {
			rs(1);
			rs(2);
			}
			else rs(3);
	break;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = gf(47,gf(47,0)) == 0;
	question = "Turn on the power.";
	text1 = "You get on your knees in the dirt, open the base of the power spiral, and try to determine why the power flow stopped.";
	text2 = "You very rapidly reach the limits of your knowledge of mechanics. All of the bits of wire and delicate metal parts defeat your comprehension. You get back up.";
	text3 = "You pull out a few sections of wire and reconnect them. You push the gears with your finger to make sure they aren't stuck. You find that the parts are generally damp and dirty. A bit of care and cleaning gets them running again.";
	text4 = "The problem, you suspect, is that delicate machinery like this is not meant to be out in the elements for too long. Without constant maintenance, all of this stuff will just break down again.";
	text5 = "Once again, the unstoppable forces of weather and decay have conspired to undo the work of the Shapers. You doubt that pacification pylons will be a long term solution for their problems.";
	action = END_TALK;
	code =
		if (get_stat(21) < 8) {
			rs(3); rs(4); rs(5);
			}
			else {
				rs(2);
				sf(47,gf(47,0),1);
				award_party_xp(100,18);
				if (gf(47,4) == 0) {
					rs(5); 
					sf(47,4,1);
					}
					else rs(4);
				}
	break;
	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "Leave it alone.";
	text1 = "Power spirals can explode if not treated properly. You leave it alone.";
	action = END_TALK;
	
//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		